<?php
namespace app\erp\validate;

use think\Validate;

class Departmentrule extends Validate
{
    protected $rule = [
        'department_name' => 'require|min:2|unique:department,department_name^partner_id^site_id'
    ];

    protected $message = [
        'site_name.require' => '部门名称必须填写',
        'site_name.min' => '部门名称最少两个汉字',
        'site_name.unique' => '部门名称已存在'
    ];
}